/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#pragma once

/// Omen Headers
#include "OmenConfig.h"

#include <IOmenSceneManager.h>
#include <IOmenScene.h>
#include <IOmenCamera.h>
#include <IOmenRenderer.h>

/// STL Headers
#include <vector>

namespace Omen
{
    class OMEN_API SceneManager : public Omen::ISceneManager
    {
        #define GUID_OMEN_SCENEMANAGER "83068961-766D-4569-B6C6-2853CC577806"

    public:
        virtual Omen_GUID classId() const { return OMEN_UUID(GUID_OMEN_SCENEMANAGER); }    /// <summary>Defines the class ID</summary>

        /// Constructors & destructor
        SceneManager( Omen::IObject* pParent = 0 );
        SceneManager( const SceneManager& other );
        virtual ~SceneManager();

      
        /// renderers
        virtual void                addRenderer( const IRenderer* pRenderer );                /// <summary>Add a new renderer to the SceneManager</summary>
        virtual unsigned int        getRenderers( const IRenderer** pRendererList, unsigned int maxSize );    /// <summary> Add a new Renderer to the Renderer manager</summary>
        virtual unsigned int        rendererCount() const;                                    /// <summary>Get number of renderers in the  manager</summary>
        virtual const IRenderer*    currentRenderer() const;                                /// <summary>Return currently active renderer</summary>
        virtual void                setCurrentRenderer( const IRenderer* pRenderer );        /// <summary>Sets the currently active camera</summary>

        /// scenes
        virtual void            addScene( IScene* pScene );                                   /// <summary> Add a new scene to the scene manager</summary>
        virtual unsigned int    getScenes( const IScene** pSceneList, unsigned int maxSize );       /// <summary> Add a new scene to the scene manager</summary>
        virtual unsigned int    sceneCount() const;                                                 /// <summary>Get number of scenes in the  manager</summary>
        virtual IScene*         currentScene();                                                     /// <summary>Get current scene</summary>
        virtual void            setCurrentScene( IScene* pScene );                            /// <summary>Set current scene</summary>
        

    protected:
    private:
        #pragma warning(disable:4251) // Disable warning about private member variable needs to have dll-interface to be used by clients of class 'this'
        std::vector<const IRenderer*> m_listRenderers;
        std::vector<const IScene*>    m_listScenes;
        #pragma warning(default:4251) 

        const IRenderer*    m_pCurrentRenderer;
        IScene*             m_pCurrentScene;
    };
}